package com.silver.weibo.server.Impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.silver.weibo.dao.CollectMapper;
import com.silver.weibo.entity.Collect;
import com.silver.weibo.entity.vo.CollectVO;
import com.silver.weibo.server.CollectService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectServiceImpl extends ServiceImpl<CollectMapper, Collect> implements CollectService {

    private final CollectMapper collectMapper;

    public CollectServiceImpl(CollectMapper collectMapper) {
        this.collectMapper = collectMapper;
    }


    @Override
    public Collect selectByUserIdAndBlogID(Collect collection) {
        return collectMapper.selectByUserIdAndBlogID(collection);
    }

    @Override
    public Boolean updateByCollect(Collect collect) {
        return collectMapper.updateByCollect(collect);
    }

    @Override
    public void selectMyCollectDetail(IPage<CollectVO> page, Integer userId) {
        collectMapper.selectMyCollectDetail(page,userId);
    }


}
